//
//  JHPageControl.h
//  CCBShop
//
//  Created by lijianhua on 14-8-1.
//  Copyright (c) 2014年 CCB. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIControl.h>
#import <UIKit/UIKitDefines.h>

typedef enum
{
	JHPageControlTypeOnFullOffFull		= 0,
	JHPageControlTypeOnFullOffEmpty		= 1,
	JHPageControlTypeOnEmptyOffFull		= 2,
	JHPageControlTypeOnEmptyOffEmpty	= 3,
}
JHPageControlType;

@interface JHPageControl : UIControl
{
	NSInteger numberOfPages;
	NSInteger currentPage;
}

@property(nonatomic,assign) NSInteger numberOfPages;
@property(nonatomic,assign) NSInteger currentPage;

@property(nonatomic,assign) BOOL hidesForSinglePage;
@property(nonatomic,assign) BOOL defersCurrentPageDisplay;
@property (nonatomic,assign) JHPageControlType type;

@property (nonatomic,retain) UIColor *onColor;
@property (nonatomic,retain) UIColor *offColor;

@property (nonatomic,assign) CGFloat indicatorDiameter;
@property (nonatomic,assign) CGFloat indicatorSpace;

- (void)updateCurrentPageDisplay;
- (CGSize)sizeForNumberOfPages:(NSInteger)pageCount;
- (id)initWithType:(JHPageControlType)theType;

@end
